<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%@ page import="java.util.*" %>

<html>
<head>
	<title></title>

	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/help/help.css" />
		
	<link type="text/css" href="<%= request.getContextPath() %>/css/datepicker/css/ui.all.css" rel="stylesheet" />
	
	
<script type="text/javascript"> 

	var wait_time=10;  // กำหนดเวลานับถอยหลัง เป็นวินาที  
	window.onload=function(){  
    	var vela=setInterval("decrease_num()",1000);  
    	setTimeout("clearInterval("+vela+")",(wait_time+1)*1000);  
	}  

function decrease_num(){
	
    if(wait_time>0){  
    	var show_place=document.getElementById('show_text');  
    	show_place.innerHTML="Wait your turn "+wait_time+" seconds";  
    	wait_time=wait_time-1;

        if(wait_time==0){  
            //alert("sadung.com");   // คำสั่งหลังจากนับถอยหลังถึง 0 แล้ว
            //window.location.href ="http://www.sadung.com"; //ไปยัง url ที่ต้องการ
            alert();
            alert(<%= request.getContextPath() %>);     			
        }    	
    }else{
    	    
        if(wait_time==0){  
            alert("sadung.com");   // คำสั่งหลังจากนับถอยหลังถึง 0 แล้ว  
   			//window.location.href ="http://www.sadung.com"; //ไปยัง url ที่ต้องการ
        }     
    }  
    
}  
</script> 
	
<script type="text/javascript" >

function modalWinPrint(aa) {

	var lAddr = "192.168.1.156";//document.getElementById("localAddr").value;
	var lPort = document.getElementById("localPort").value;
//	var ctPath = document.getElementById("contextPath").value;
	
	aa = "http://"+lAddr+":"+lPort+aa;
	
	if (window.showModalDialog) {
		alert(aa);
		window.showModalDialog(aa,"name","dialogTop:100px;dialogWidth:650px;dialogHeight:350px;center:yes");
	} else {		
		alert('bb');
		window.open(aa,'name','height=350,width=600,toolbar=no,directories=no,status=no,continued from previous linemenubar=no,scrollbars=no,resizable=no ,modal=yes');
	}
}
</script>	

<script language="javascript">

function popup(Site){
	alert(Site);
	window.open(Site,'PopupName','toolbar=no,statusbar=no, location=no,scrollbars=yes,resizable=yes,width=275,height=200')
}


</script>

<script type="text/javascript">

function refreshForm() {
	var lAddr = document.getElementById("localAddr").value;
	var lPort = document.getElementById("localPort").value;
	var ctPath = document.getElementById("contextPath").value;
	var docNo = document.getElementById("docNo").value
	window.location = "http://"+lAddr+":"+lPort+ctPath+"/StkReq.do?mode=edit&docNo="+docNo;	
}
function gotoMenu() {
	var lAddr = document.getElementById("localAddr").value;
	var lPort = document.getElementById("localPort").value;
	var ctPath = document.getElementById("contextPath").value;
	window.location = "http://"+lAddr+":"+lPort+ctPath+"/Login.do?mode=check";
}
</script>


</head>

<body >
 
<input type="hidden" value="<%=request.getLocalAddr() %>" id="localAddr">
<input type="hidden" value="<%=request.getLocalPort() %>" id="localPort">
<input type="hidden" value="<%=request.getContextPath() %>" id="contextPath">


<div id="wrapper">
	<!-- 
		<div id="header"><img src="images/kiuchilogo.png" width="305" height="80" /></div>
	 -->	 
	<div id="menu">
	    
	  </div>
	  
	<div id="content">  
		บันทึกข้อมูลเรียบร้อย  <br /><br />
		<center>
		<table width="70%">
			<tr>
				<td width="20%"><a href='<%=request.getContextPath() %>/Login.do?mode=check'>กลับสู่หน้าหลัก</a> </td>
				<td width="40%"><a href='<%=request.getContextPath() %>/StkReq.do?mode=blank&issueType=01'>บันทึกใบ พ.1(ขอเบิก)รายการถัดไป </a> </td>
				<td width="40%"><a href='<%=request.getContextPath() %>/Report.do?mode=printStockRequest&docNo=${docNoPrint }' target="_blank">Print พ.1: ${docNoPrint }</a></td>
			</tr>
		</table>
		
		
		</center>
		<!-- 
		<meta http-equiv="refresh" 
		content="5;url=StkReq.do?mode=blank&issueType=01" >
		 -->
		
		<span id="show_text"></span>
     </div>
     
  	</div>
  		  

</body>
</html>